import Layout from '@/views/layout'
import Layout2 from '@/views/layout/index2'

const settingRouter = {
  path: '/settingsManagement',
  component: Layout2,
  redirect: 'noredirect',
  name: 'settingsManagement',
  needAuth: true,
  meta: { title: '设置', icon: 'setup-icon' },
  children: [
    {
      path: '/menuManage',
      component: Layout,
      meta: { title: '菜单管理', breadcrumb: false },
      redirect: '/menuManage/index',
      name: 'menuManage',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'menuIndex',
        component: () => import('@/views/menuManage/index'),
        meta: { title: '菜单管理', noCache: true }
      },
      {
        path: 'add',
        name: 'addMenu',
        component: () => import('@/views/menuManage/add'),
        meta: { title: '添加菜单', noCache: false, activeMenu: '/menuManage/index' },
        hidden: true
      },
      {
        path: 'edit',
        name: 'editMenu',
        component: () => import('@/views/menuManage/add'),
        meta: { title: '编辑菜单', noCache: false, activeMenu: '/menuManage/index' },
        hidden: true
      }]
    },
    {
      path: '/appConfigManage',
      component: Layout,
      meta: { title: 'App配置管理', breadcrumb: false },
      redirect: '/appConfigManage/index',
      name: 'appConfigManage',
      needAuth: true,
      children: [{
        path: 'index',
        name: 'appConfigManageIndex',
        component: () => import('@/views/appConfigManage/index'),
        meta: { title: 'App配置管理', noCache: true }
      },
      {
        path: 'addTnc',
        name: 'addTnc',
        component: () => import(/* webpackChunkName: "system" */'@/views/appConfigManage/components/tnc/add-tnc'),
        meta: { title: '新增协议', activeMenu: '/appConfigManage/index' },
        hidden: true
      },
      {
        path: 'editTnc',
        name: 'editTnc',
        component: () => import(/* webpackChunkName: "system" */'@/views/appConfigManage/components/tnc/edit-tnc'),
        meta: { title: '编辑协议', activeMenu: '/appConfigManage/index' },
        hidden: true
      }]
    }
  ]
}

export default settingRouter